<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<meta charset="utf-8">
<title>设备列表--后台管理</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="${site.logo}">
<link rel="stylesheet" th:href="@{/static/layui/css/layui.css}" media="all"/>
<link rel="stylesheet" th:href="@{/static/admin/css/list.css}" media="all"/>
</head>
<body class="childrenBody">
<fieldset class="layui-elem-field">
    <legend>设备检索</legend>
    <div class="layui-field-box">
        <form class="layui-form">
            <div class="layui-inline" style="width: 15%">
                <input type="text" value="" name="deviceName" placeholder="输入设备名称" class="layui-input search_input">
            </div>
            <div class="layui-inline" style="width: 15%">
                <input type="text" value="" name="deviceSn" placeholder="输入设备SN码" class="layui-input search_input">
            </div>
            <div class="layui-inline" style="width: 15%">
                <select name="deviceStatus">
                    <option value="">全部</option>
                    <option value="1">采购中</option>
                    <option value="2">未使用</option>
                    <option value="3">已使用</option>
                    <option value="4">以报废</option>
                </select>
            </div>

            <div class="layui-inline">
                <a class="layui-btn" lay-submit="" lay-filter="searchForm">查询</a>
            </div>
            <div class="layui-inline">
                <a class="layui-btn layui-btn-normal" data-type="addDevice">添加设备</a>
            </div>
            <div class="layui-inline">
                <a class="layui-btn layui-btn-danger" data-type="deleteSome">批量删除</a>
            </div>
        </form>
    </div>
</fieldset>
<div class="layui-form device_list">
    <table class="layui-table" id="deviceTable" lay-filter="deviceList"></table>

    <script type="text/html" id="deviceStatus">
        {{#  if(d.deviceStatus == 1){ }}
        <span class="layui-bay6tdge layui-bg-green">采购中</span>
        {{#  }else if(d.deviceStatus == 2){ }}
        <span class="layui-badge layui-bg-warm">未使用</span>
        {{#  }else if(d.deviceStatus == 3){ }}
        <span class="layui-badge layui-bg-warm">已使用</span>
        {{#  }else if(d.deviceStatus == 4){ }}
        <span class="layui-badge layui-bg-warm">已报废</span>
        {{#  }else{ }}
        <span class="layui-badge layui-bg-warm">其他</span>
        {{#  } }}
    </script>

    <script type="text/html" id="deviceBar">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
</div>
<div id="page"></div>
<script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/admin/js/tools.js}"></script>
<script type="text/javascript" th:src="@{/static/device/list.js}"></script>
</body>
</html>